package com.kili.mirco.spark_als.ref.hanlder;

import com.kili.mirco.spark_als.model.Ratings;
import com.kili.mirco.spark_als.ref.Processor;

import java.util.List;
import java.util.Map;

/**
 * @date 19-6-3
 * @auther jackliang
 * @description TODO
 */
public interface RecommendProcessor extends Processor {

    /**
     * Calculate a list of similar products corresponding to a product
     *
     * @param itemId
     * @return
     */
    List<Ratings> refiningSimilarityItemCF(final long itemId);

    /**
     * Recommend TOP num products for each user
     *
     * @param num
     * @return
     */
    Map<Integer, List<Ratings>> recommendUsersForProducts(final int num);

    /**
     * Recommend TOP num items for specified users
     *
     * @param userId
     * @param num
     * @return
     */
    List<Ratings> recommendProducts(final int userId, final int num);


    /**
     * Recommend the most likely user set num for a given item
     *
     * @param productId
     * @param num
     * @return
     */
    List<Ratings> recommendUsers(final int productId, final int num);

    /**
     * Recommend the most interested collection of TOP num individuals for all products
     *
     * @param num
     * @return
     */
    Map<Integer, List<Ratings>> recommendProductsForUsers(int num);


}
